import { IMG_URL } from '../config';
const getImgUrl = (id, size = false) => {
    return IMG_URL + "?id=" + id + (size ? "&size=" + parseInt(size) : "");
};

const getImgUrlWater = (id, size = false, type = 'text') => {
    return IMG_URL + "?id=" + id + '&' + type + '=1' + (size ? "&size=" + parseInt(size) : "");
};

const fixHeight = height => {
    if (window.innerWidth < 1400) {
        return height + 150 >= window.innerHeight ? window.innerHeight - 150 : height;
    } else {
        return height;
    }
};

export default {
    getImgUrl,
    getImgUrlWater,
    fixHeight
}